package com.jvtd.nettyim.im.client.handler;

import com.jvtd.nettyim.im.protocol.response.MessageResponsePacket;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

import java.util.Date;

/**
 * @author Created by neal.zhang
 * @date 2020/5/29 - 18:26
 */
public class MessageResponseHandler extends SimpleChannelInboundHandler<MessageResponsePacket> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, MessageResponsePacket msg) throws Exception {
        String fromUserId = msg.getFromUserId();
        String fromUserName = msg.getFromUserName();
        System.err.println(fromUserId+"-"+fromUserName+": "+msg.getMessage());
    }
}
